package com.luhe.musicscore.ui.factory;



import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import java.awt.*;
import java.lang.reflect.Field;
import java.util.Vector;

public class TableFactory {

    //从节点生成属性编辑表格表格
    public JTable createTableFromNode() {

        //创建表格
        DefaultTableModel defaultTableModel = new DefaultTableModel();
        JTable jTable = new JTable(defaultTableModel);
        defaultTableModel.setColumnIdentifiers(new Object[]{"属性", "值"});


        jTable.setBounds(0, 0, 200, 300);
        jTable.setBackground(Color.ORANGE);
        jTable.getColumnModel().getColumn(0).setPreferredWidth(40);


        return jTable;
    }
}
